package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 论文评分规则表
 * @TableName paper_scoring_rule
 */
@TableName(value ="paper_scoring_rule")
@Data
public class PaperScoringRule implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 论文类型
     */
    private Object paperType;

    /**
     * 类型描述
     */
    private String description;

    /**
     * 基础分值
     */
    private Double baseScore;

    /**
     * 研三学生乘数
     */
    private Double seniorMultiplier;

    /**
     * 生效日期
     */
    private Date effectiveDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PaperScoringRule other = (PaperScoringRule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPaperType() == null ? other.getPaperType() == null : this.getPaperType().equals(other.getPaperType()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getBaseScore() == null ? other.getBaseScore() == null : this.getBaseScore().equals(other.getBaseScore()))
            && (this.getSeniorMultiplier() == null ? other.getSeniorMultiplier() == null : this.getSeniorMultiplier().equals(other.getSeniorMultiplier()))
            && (this.getEffectiveDate() == null ? other.getEffectiveDate() == null : this.getEffectiveDate().equals(other.getEffectiveDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPaperType() == null) ? 0 : getPaperType().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getBaseScore() == null) ? 0 : getBaseScore().hashCode());
        result = prime * result + ((getSeniorMultiplier() == null) ? 0 : getSeniorMultiplier().hashCode());
        result = prime * result + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", paperType=").append(paperType);
        sb.append(", description=").append(description);
        sb.append(", baseScore=").append(baseScore);
        sb.append(", seniorMultiplier=").append(seniorMultiplier);
        sb.append(", effectiveDate=").append(effectiveDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}